package com.example.administrator.myapplication.muscle;

import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.example.administrator.myapplication.R;

public class muscleActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_muscle);
        getMuscleMainFragment();
    }

    public void getMuscleMainFragment(){
        muscle_main_Fragment muscleMainFragment = new muscle_main_Fragment();
        FragmentManager fm = this.getFragmentManager();            //设置fragment管理器
        FragmentTransaction ft = fm.beginTransaction();
        ft.replace(R.id.fragment_muscle, muscleMainFragment);      //替换当前的fragment
        ft.commit();
    }
}
